<!--
 * @LastEditors: 杜康
 * @LastEditTime: 2021-09-15 16:55:34
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>错误示例2</title>
</head>

<body>
  <div id="app">
    <ele>
      <div>
        <Child />
      </div>
    </ele>
  </div>
  <script src="https://unpkg.com/vue/dist/vue.min.js"></script>
  <script>
    // 局部组件生命
    var Child = {
      render: function (createElement) {
        return createElement('p', 'text')
      }
    }
    Vue.component('ele', {
      render: function (createElement) {
        console.log(this.$slots)
        return createElement('div', [
          this.$slots.default,
          this.$slots.default
        ])
      }
    })
    var app = new Vue({
      el: '#app'
    })
  </script>
</body>

</html>